cmake_minimum_required(VERSION 2.8.4)

#SET(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/source)
#set (OpenCV_DIR D:/OpenCV/opencv2413/build)
#FIND_PACKAGE(OpenCV REQUIRED)
#INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS} ${PROJECT_INCLUDE})

AUX_SOURCE_DIRECTORY(. SRC_MODULE_LIST)

message(STATUS "CPP path IN THIS DIR is " ${SRC_MODULE_LIST})
message(STATUS "CPP path IN upper DIR is " ${SRC_LIST})

add_library(SRC_MODULE_dynamic SHARED ${SRC_MODULE_LIST})
add_library(SRC_MODULE_static STATIC ${SRC_MODULE_LIST})
TARGET_LINK_LIBRARIES(SRC_MODULE_dynamic ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES(SRC_MODULE_static ${OpenCV_LIBS})

set_target_properties(SRC_MODULE_dynamic PROPERTIES OUTPUT_NAME "SRC_MODULE")
set_target_properties(SRC_MODULE_dynamic PROPERTIES VERSION 1.2 SOVERSION 1)

set_target_properties(SRC_MODULE_static PROPERTIES OUTPUT_NAME "SRC_MODULE")
#set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)